<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 17-10-19
 * Time: 下午2:31
 */

namespace wodrow\models;


use ActiveRecord\Model;

/**
 * Class Member
 * @package wodrow\models
 *
 * @property integer $u_id
 * @property string $u_code
 * @property string $u_name
 * @property string $u_password
 * @property string $u_salt
 * @property integer $u_role
 * @property string $u_realname
 * @property string $u_dp_type
 * @property integer $u_dp_id
 * @property string $u_scope
 * @property integer $u_auditlevel
 * @property string $u_mobile
 * @property string $u_job
 * @property string $u_addr
 * @property string $u_idcard
 * @property string $u_sex
 * @property string $u_birthday
 * @property string $u_culture
 * @property string $u_tel
 * @property string $u_qq
 * @property string $u_info
 * @property string $u_bank
 * @property string $u_avatar
 * @property integer $u_addtime
 * @property string $u_status
 */
class Member extends Model
{
    const DP_TYPE_DOT = 'dot';
    const DP_TYPE_DP= 'dp';
    const DP_TYPE_RG= 'rg';
    public static function getDpType()
    {
        return array(
            self::DP_TYPE_DOT=>'网点',
            self::DP_TYPE_DP=>'部门',
            self::DP_TYPE_RG=>'大区',
        );
    }
    const SCOPE_USER = '用户级';
    const SCOPE_DP = '部门级';
    const SCOPE_COMP = '单位级';
    public static function getScope()
    {
        return array(
            self::SCOPE_USER => '用户级',
            self::SCOPE_DP => '部门级',
            self::SCOPE_COMP => '单位级',
        );
    }

    public static $table_name = "dyhl_member";
}